<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Example</title>
</head>

<body>
  <button id="pressme">Press Me</button>
  <script>
  document.getElementById('pressme').onclick = function() {
    document.location.assign("http://apress.com");
  };
  </script>
</body>

</html>
